3.186 \(\int \frac{(h+i x) (a+b \log (c (e+f x)))^2}{d e+d f x} \, dx\)

Optimal. Leaf size=113 \[ \frac{(f h-e i) (a+b \log (c (e+f x)))^3}{3 b d f^2}+\frac{i (e+f x) (a+b \log (c (e+f x)))^2}{d f^2}-\frac{2 a b i x}{d f}-\frac{2 b^2 i (e+f x) \log (c (e+f x))}{d f^2}+\frac{2 b^2 i x}{d f} \]

[Out]

(-2*a*b*i*x)/(d*f) + (2*b^2*i*x)/(d*f) - (2*b^2*i*(e + f*x)*Log[c*(e + f*x)])/(d*f^2) + (i*(e + f*x)*(a + b*Lo
g[c*(e + f*x)])^2)/(d*f^2) + ((f*h - e*i)*(a + b*Log[c*(e + f*x)])^3)/(3*b*d*f^2)

________________________________________________________________________________________

Rubi [A]  time = 0.201975, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.233, Rules used = {2411, 12, 2346, 2302, 30, 2296, 2295} \[ \frac{(f h-e i) (a+b \log (c (e+f x)))^3}{3 b d f^2}+\frac{i (e+f x) (a+b \log (c (e+f x)))^2}{d f^2}-\frac{2 a b i x}{d f}-\frac{2 b^2 i (e+f x) \log (c (e+f x))}{d f^2}+\frac{2 b^2 i x}{d f} \]

Antiderivative was successfully verified.

[In]

Int[((h + i*x)*(a + b*Log[c*(e + f*x)])^2)/(d*e + d*f*x),x]

[Out]

(-2*a*b*i*x)/(d*f) + (2*b^2*i*x)/(d*f) - (2*b^2*i*(e + f*x)*Log[c*(e + f*x)])/(d*f^2) + (i*(e + f*x)*(a + b*Lo
g[c*(e + f*x)])^2)/(d*f^2) + ((f*h - e*i)*(a + b*Log[c*(e + f*x)])^3)/(3*b*d*f^2)

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin{align*} \int \frac{(h+186 x) (a+b \log (c (e+f x)))^2}{d e+d f x} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{-186 e+f h}{f}+\frac{186 x}{f}\right ) (a+b \log (c x))^2}{d x} \, dx,x,e+f x\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{-186 e+f h}{f}+\frac{186 x}{f}\right ) (a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d f}\\ &=\frac{186 \operatorname{Subst}\left (\int (a+b \log (c x))^2 \, dx,x,e+f x\right )}{d f^2}-\frac{(186 e-f h) \operatorname{Subst}\left (\int \frac{(a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d f^2}\\ &=\frac{186 (e+f x) (a+b \log (c (e+f x)))^2}{d f^2}-\frac{(372 b) \operatorname{Subst}(\int (a+b \log (c x)) \, dx,x,e+f x)}{d f^2}-\frac{(186 e-f h) \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log (c (e+f x))\right )}{b d f^2}\\ &=-\frac{372 a b x}{d f}+\frac{186 (e+f x) (a+b \log (c (e+f x)))^2}{d f^2}-\frac{(186 e-f h) (a+b \log (c (e+f x)))^3}{3 b d f^2}-\frac{\left (372 b^2\right ) \operatorname{Subst}(\int \log (c x) \, dx,x,e+f x)}{d f^2}\\ &=-\frac{372 a b x}{d f}+\frac{372 b^2 x}{d f}-\frac{372 b^2 (e+f x) \log (c (e+f x))}{d f^2}+\frac{186 (e+f x) (a+b \log (c (e+f x)))^2}{d f^2}-\frac{(186 e-f h) (a+b \log (c (e+f x)))^3}{3 b d f^2}\\ \end{align*}

Mathematica [A]  time = 0.0567316, size = 89, normalized size = 0.79 \[ \frac{\frac{(f h-e i) (a+b \log (c (e+f x)))^3}{b}+3 i (e+f x) (a+b \log (c (e+f x)))^2-6 b f i x (a-b)-6 b^2 i (e+f x) \log (c (e+f x))}{3 d f^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((h + i*x)*(a + b*Log[c*(e + f*x)])^2)/(d*e + d*f*x),x]

[Out]

(-6*(a - b)*b*f*i*x - 6*b^2*i*(e + f*x)*Log[c*(e + f*x)] + 3*i*(e + f*x)*(a + b*Log[c*(e + f*x)])^2 + ((f*h -
e*i)*(a + b*Log[c*(e + f*x)])^3)/b)/(3*d*f^2)

________________________________________________________________________________________

Maple [B]  time = 0.062, size = 341, normalized size = 3. \begin{align*} -{\frac{{a}^{2}ei\ln \left ( cfx+ce \right ) }{d{f}^{2}}}+{\frac{{a}^{2}h\ln \left ( cfx+ce \right ) }{df}}+{\frac{{a}^{2}ix}{df}}+{\frac{{a}^{2}ei}{d{f}^{2}}}-{\frac{abei \left ( \ln \left ( cfx+ce \right ) \right ) ^{2}}{d{f}^{2}}}+{\frac{abh \left ( \ln \left ( cfx+ce \right ) \right ) ^{2}}{df}}+2\,{\frac{abi\ln \left ( cfx+ce \right ) x}{df}}+2\,{\frac{abi\ln \left ( cfx+ce \right ) e}{d{f}^{2}}}-2\,{\frac{abix}{df}}-2\,{\frac{abei}{d{f}^{2}}}-{\frac{{b}^{2}ei \left ( \ln \left ( cfx+ce \right ) \right ) ^{3}}{3\,d{f}^{2}}}+{\frac{{b}^{2}h \left ( \ln \left ( cfx+ce \right ) \right ) ^{3}}{3\,df}}+{\frac{{b}^{2}i \left ( \ln \left ( cfx+ce \right ) \right ) ^{2}x}{df}}+{\frac{{b}^{2}i \left ( \ln \left ( cfx+ce \right ) \right ) ^{2}e}{d{f}^{2}}}-2\,{\frac{{b}^{2}i\ln \left ( cfx+ce \right ) x}{df}}-2\,{\frac{{b}^{2}i\ln \left ( cfx+ce \right ) e}{d{f}^{2}}}+2\,{\frac{{b}^{2}ix}{df}}+2\,{\frac{{b}^{2}ei}{d{f}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((i*x+h)*(a+b*ln(c*(f*x+e)))^2/(d*f*x+d*e),x)

[Out]

-1/f^2/d*a^2*e*i*ln(c*f*x+c*e)+1/f/d*a^2*h*ln(c*f*x+c*e)+1/f/d*a^2*i*x+1/f^2/d*a^2*e*i-1/f^2/d*a*b*e*i*ln(c*f*
x+c*e)^2+1/f/d*a*b*h*ln(c*f*x+c*e)^2+2/f/d*a*b*i*ln(c*f*x+c*e)*x+2/f^2/d*a*b*i*ln(c*f*x+c*e)*e-2*a*b*i*x/d/f-2
/f^2/d*a*b*e*i-1/3/f^2/d*b^2*e*i*ln(c*f*x+c*e)^3+1/3/f/d*b^2*h*ln(c*f*x+c*e)^3+1/f/d*b^2*i*ln(c*f*x+c*e)^2*x+1
/f^2/d*b^2*i*ln(c*f*x+c*e)^2*e-2/f/d*b^2*i*ln(c*f*x+c*e)*x-2/f^2/d*b^2*i*ln(c*f*x+c*e)*e+2*b^2*i*x/d/f+2/f^2/d
*b^2*e*i

________________________________________________________________________________________

Maxima [B]  time = 1.24785, size = 410, normalized size = 3.63 \begin{align*} 2 \, a b i{\left (\frac{x}{d f} - \frac{e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) - a b h{\left (\frac{2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac{\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + a^{2} i{\left (\frac{x}{d f} - \frac{e \log \left (f x + e\right )}{d f^{2}}\right )} + \frac{b^{2} h \log \left (c f x + c e\right )^{3}}{3 \, d f} + \frac{2 \, a b h \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} + \frac{a^{2} h \log \left (d f x + d e\right )}{d f} + \frac{{\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} a b i}{d f^{2}} - \frac{{\left (c^{2} e \log \left (c f x + c e\right )^{3} - 3 \,{\left (c f x + c e\right )}{\left (c \log \left (c f x + c e\right )^{2} - 2 \, c \log \left (c f x + c e\right ) + 2 \, c\right )}\right )} b^{2} i}{3 \, c^{2} d f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))^2/(d*f*x+d*e),x, algorithm="maxima")

[Out]

2*a*b*i*(x/(d*f) - e*log(f*x + e)/(d*f^2))*log(c*f*x + c*e) - a*b*h*(2*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f)
 - (log(f*x + e)^2 + 2*log(f*x + e)*log(c))/(d*f)) + a^2*i*(x/(d*f) - e*log(f*x + e)/(d*f^2)) + 1/3*b^2*h*log(
c*f*x + c*e)^3/(d*f) + 2*a*b*h*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f) + a^2*h*log(d*f*x + d*e)/(d*f) + (e*log
(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*a*b*i/(d*f^2) - 1/3*(c^2*e*log(c*f*x + c*e)^3 - 3*(c*f*x + c*e)*(c*log
(c*f*x + c*e)^2 - 2*c*log(c*f*x + c*e) + 2*c))*b^2*i/(c^2*d*f^2)

________________________________________________________________________________________

Fricas [A]  time = 1.6003, size = 311, normalized size = 2.75 \begin{align*} \frac{3 \,{\left (a^{2} - 2 \, a b + 2 \, b^{2}\right )} f i x +{\left (b^{2} f h - b^{2} e i\right )} \log \left (c f x + c e\right )^{3} + 3 \,{\left (b^{2} f i x + a b f h -{\left (a b - b^{2}\right )} e i\right )} \log \left (c f x + c e\right )^{2} + 3 \,{\left (a^{2} f h + 2 \,{\left (a b - b^{2}\right )} f i x -{\left (a^{2} - 2 \, a b + 2 \, b^{2}\right )} e i\right )} \log \left (c f x + c e\right )}{3 \, d f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))^2/(d*f*x+d*e),x, algorithm="fricas")

[Out]

1/3*(3*(a^2 - 2*a*b + 2*b^2)*f*i*x + (b^2*f*h - b^2*e*i)*log(c*f*x + c*e)^3 + 3*(b^2*f*i*x + a*b*f*h - (a*b -
b^2)*e*i)*log(c*f*x + c*e)^2 + 3*(a^2*f*h + 2*(a*b - b^2)*f*i*x - (a^2 - 2*a*b + 2*b^2)*e*i)*log(c*f*x + c*e))
/(d*f^2)

________________________________________________________________________________________

Sympy [A]  time = 1.7022, size = 168, normalized size = 1.49 \begin{align*} \frac{x \left (a^{2} i - 2 a b i + 2 b^{2} i\right )}{d f} + \frac{\left (2 a b i x - 2 b^{2} i x\right ) \log{\left (c \left (e + f x\right ) \right )}}{d f} + \frac{\left (- b^{2} e i + b^{2} f h\right ) \log{\left (c \left (e + f x\right ) \right )}^{3}}{3 d f^{2}} - \frac{\left (a^{2} e i - a^{2} f h - 2 a b e i + 2 b^{2} e i\right ) \log{\left (e + f x \right )}}{d f^{2}} + \frac{\left (- a b e i + a b f h + b^{2} e i + b^{2} f i x\right ) \log{\left (c \left (e + f x\right ) \right )}^{2}}{d f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*ln(c*(f*x+e)))**2/(d*f*x+d*e),x)

[Out]

x*(a**2*i - 2*a*b*i + 2*b**2*i)/(d*f) + (2*a*b*i*x - 2*b**2*i*x)*log(c*(e + f*x))/(d*f) + (-b**2*e*i + b**2*f*
h)*log(c*(e + f*x))**3/(3*d*f**2) - (a**2*e*i - a**2*f*h - 2*a*b*e*i + 2*b**2*e*i)*log(e + f*x)/(d*f**2) + (-a
*b*e*i + a*b*f*h + b**2*e*i + b**2*f*i*x)*log(c*(e + f*x))**2/(d*f**2)

________________________________________________________________________________________

Giac [B]  time = 1.17418, size = 324, normalized size = 2.87 \begin{align*} \frac{3 \, b^{2} f i x \log \left (c f x + c e\right )^{2} + b^{2} f h \log \left (c f x + c e\right )^{3} - b^{2} i e \log \left (c f x + c e\right )^{3} + 6 \, a b f i x \log \left (c f x + c e\right ) - 6 \, b^{2} f i x \log \left (c f x + c e\right ) + 3 \, a b f h \log \left (c f x + c e\right )^{2} - 3 \, a b i e \log \left (c f x + c e\right )^{2} + 3 \, b^{2} i e \log \left (c f x + c e\right )^{2} + 3 \, a^{2} f i x - 6 \, a b f i x + 6 \, b^{2} f i x + 3 \, a^{2} f h \log \left (f x + e\right ) - 3 \, a^{2} i e \log \left (f x + e\right ) + 6 \, a b i e \log \left (f x + e\right ) - 6 \, b^{2} i e \log \left (f x + e\right )}{3 \, d f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))^2/(d*f*x+d*e),x, algorithm="giac")

[Out]

1/3*(3*b^2*f*i*x*log(c*f*x + c*e)^2 + b^2*f*h*log(c*f*x + c*e)^3 - b^2*i*e*log(c*f*x + c*e)^3 + 6*a*b*f*i*x*lo
g(c*f*x + c*e) - 6*b^2*f*i*x*log(c*f*x + c*e) + 3*a*b*f*h*log(c*f*x + c*e)^2 - 3*a*b*i*e*log(c*f*x + c*e)^2 +
3*b^2*i*e*log(c*f*x + c*e)^2 + 3*a^2*f*i*x - 6*a*b*f*i*x + 6*b^2*f*i*x + 3*a^2*f*h*log(f*x + e) - 3*a^2*i*e*lo
g(f*x + e) + 6*a*b*i*e*log(f*x + e) - 6*b^2*i*e*log(f*x + e))/(d*f^2)